.class public Lcom/instagram/android/directshare/f/a;
.super Ljava/lang/Object;
.source "DirectShareNuxHelper.java"


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:Landroid/support/v4/app/r;

.field private final c:Landroid/os/Handler;

.field private d:Landroid/app/Dialog;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/support/v4/app/r;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 32
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 28
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/f/a;->c:Landroid/os/Handler;

    .line 33
    iput-object p1, p0, Lcom/instagram/android/directshare/f/a;->a:Landroid/content/Context;

    .line 34
    iput-object p2, p0, Lcom/instagram/android/directshare/f/a;->b:Landroid/support/v4/app/r;

    .line 35
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/directshare/f/a;Landroid/app/Dialog;)Landroid/app/Dialog;
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 24
    iput-object p1, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    return-object p1
.end method

.method static synthetic a(Lcom/instagram/android/directshare/f/a;)Landroid/support/v4/app/r;
    .locals 1
    .parameter

    .prologue
    .line 24
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->b:Landroid/support/v4/app/r;

    return-object v0
.end method

.method private a(Landroid/view/View;)Landroid/view/animation/Animation;
    .locals 9
    .parameter

    .prologue
    const/4 v5, 0x1

    const/high16 v2, 0x3f80

    const/4 v1, 0x0

    .line 98
    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v3

    .line 99
    int-to-float v0, v3

    iget-object v4, p0, Lcom/instagram/android/directshare/f/a;->a:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v4

    const/16 v6, 0x48

    invoke-static {v4, v6}, Lcom/instagram/n/k;->a(Landroid/util/DisplayMetrics;I)F

    move-result v4

    sub-float v4, v0, v4

    .line 103
    new-instance v0, Landroid/view/animation/ScaleAnimation;

    int-to-float v3, v3

    div-float v6, v4, v3

    move v3, v1

    move v4, v2

    move v7, v5

    move v8, v1

    invoke-direct/range {v0 .. v8}, Landroid/view/animation/ScaleAnimation;-><init>(FFFFIFIF)V

    .line 113
    const-wide/16 v1, 0x1f4

    invoke-virtual {v0, v1, v2}, Landroid/view/animation/ScaleAnimation;->setDuration(J)V

    .line 114
    new-instance v1, Landroid/view/animation/OvershootInterpolator;

    const/high16 v2, 0x3fc0

    invoke-direct {v1, v2}, Landroid/view/animation/OvershootInterpolator;-><init>(F)V

    invoke-virtual {v0, v1}, Landroid/view/animation/ScaleAnimation;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 116
    new-instance v1, Lcom/instagram/android/directshare/f/e;

    invoke-direct {v1, p0}, Lcom/instagram/android/directshare/f/e;-><init>(Lcom/instagram/android/directshare/f/a;)V

    invoke-virtual {v0, v1}, Landroid/view/animation/ScaleAnimation;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V

    .line 136
    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/directshare/f/a;Landroid/view/View;)Landroid/view/animation/Animation;
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 24
    invoke-direct {p0, p1}, Lcom/instagram/android/directshare/f/a;->a(Landroid/view/View;)Landroid/view/animation/Animation;

    move-result-object v0

    return-object v0
.end method

.method static synthetic a(Lcom/instagram/android/directshare/f/a;Landroid/content/DialogInterface$OnDismissListener;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 24
    invoke-direct {p0, p1}, Lcom/instagram/android/directshare/f/a;->b(Landroid/content/DialogInterface$OnDismissListener;)V

    return-void
.end method

.method static synthetic b(Lcom/instagram/android/directshare/f/a;)Landroid/app/Dialog;
    .locals 1
    .parameter

    .prologue
    .line 24
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    return-object v0
.end method

.method private b(Landroid/content/DialogInterface$OnDismissListener;)V
    .locals 5
    .parameter

    .prologue
    const/4 v4, 0x1

    .line 53
    new-instance v0, Lcom/instagram/ui/a/a;

    iget-object v1, p0, Lcom/instagram/android/directshare/f/a;->a:Landroid/content/Context;

    sget v2, Lcom/facebook/ax;->dialog_ds_nux:I

    sget v3, Lcom/facebook/bb;->IgDialogDirectNux:I

    invoke-direct {v0, v1, v2, v3}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;II)V

    invoke-virtual {v0, v4}, Lcom/instagram/ui/a/a;->a(Z)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0, v4}, Lcom/instagram/ui/a/a;->b(Z)Lcom/instagram/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    .line 57
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    invoke-virtual {v0, p1}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 58
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 60
    new-instance v0, Lcom/instagram/android/directshare/f/c;

    invoke-direct {v0, p0}, Lcom/instagram/android/directshare/f/c;-><init>(Lcom/instagram/android/directshare/f/a;)V

    .line 68
    iget-object v1, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    sget v2, Lcom/facebook/aw;->nux_inbox_icon:I

    invoke-virtual {v1, v2}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 69
    iget-object v1, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    sget v2, Lcom/facebook/aw;->nux_content:I

    invoke-virtual {v1, v2}, Landroid/app/Dialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 72
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->c:Landroid/os/Handler;

    new-instance v1, Lcom/instagram/android/directshare/f/d;

    invoke-direct {v1, p0}, Lcom/instagram/android/directshare/f/d;-><init>(Lcom/instagram/android/directshare/f/a;)V

    const-wide/16 v2, 0x96

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 82
    return-void
.end method


# virtual methods
.method public a(Landroid/content/DialogInterface$OnDismissListener;)V
    .locals 4
    .parameter

    .prologue
    .line 38
    invoke-static {}, Lcom/instagram/android/directshare/j/c;->a()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 39
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->c:Landroid/os/Handler;

    new-instance v1, Lcom/instagram/android/directshare/f/b;

    invoke-direct {v1, p0, p1}, Lcom/instagram/android/directshare/f/b;-><init>(Lcom/instagram/android/directshare/f/a;Landroid/content/DialogInterface$OnDismissListener;)V

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 50
    :cond_0
    :goto_0
    return-void

    .line 45
    :cond_1
    invoke-static {}, Lcom/instagram/m/b/a;->a()Lcom/instagram/m/b/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/m/b/a;->u()Z

    move-result v0

    if-nez v0, :cond_0

    .line 48
    invoke-static {}, Lcom/instagram/android/directshare/a/a;->b()V

    goto :goto_0
.end method

.method public a()Z
    .locals 1

    .prologue
    .line 85
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public b()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 89
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->c:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 91
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    .line 92
    iget-object v0, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V

    .line 93
    iput-object v1, p0, Lcom/instagram/android/directshare/f/a;->d:Landroid/app/Dialog;

    .line 95
    :cond_0
    return-void
.end method
